package com.tevintao.marketingsystem.services;

import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.IBinder;
import android.support.annotation.Nullable;

/**
 * Created by tevintao on 2016/1/21.
 */
public class BaseHandlerServices extends Service {

    private static int HandlerNum = 1;
    protected HandlerThread handlerThread;
    protected Handler mHandler;


    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }


    @Override
    public void onCreate() {
        super.onCreate();
        HandlerNum++;
        handlerThread = new HandlerThread("HandlerThread" + HandlerNum);
        handlerThread.start();
        mHandler = new Handler(handlerThread.getLooper());
    }
}
